The present invention relates to input/output (I/O) subsystems, in particular memory subsystems such as a Redundant Array of Independent Disks (RAID) subsystem. In particular, the invention relates to methods for building software to handle various memory operations.
U.S. Pat. No. 5,860,003, incorporated herein by reference, shows a modular software control system for an I/O subsystem. A central group of software modules are made to be hardware-independent, with interface modules translating to and from the host hardware configuration and the I/O subsystem hardware configuration. I/O commands are executed using a series of specialized threads, with each thread performing a particular function. An appropriate group of threads are assembled for each I/O command, the group being a "net".
High performance and bandwidth is accomplished by having the threads independent and able to operate concurrently. In a RAID system, for example, if each net operates on a particular span of data in the disk drives, other nets can operate on other spans in the same disk drives concurrently. Even for a particular span of data, only particular threads within a net that actually use the disk drives need to lock up that span for the duration of the thread operation.
The span lock capability improves throughput over prior art systems where an entire physical disk drive needs to be locked to a particular I/O command. In addition, within a span, an error recovery routine may be run and only need to lock up a particular portion of that span. Thus, the thread discovering the error, or other threads, could use other portions of the span concurrently with the error recovery, further improving the bandwidth.
A core command engine is provided which is generic and can be used with any I/O system hardware. This is accomplished using a generic command module which communicates with a media module to obtain a particular net for an I/O command. The media module knows the configuration, such as RAID 3 or RAID 5, of the I/O subsystem. The command module need not know this information, and is generic. Even the media module does not know the particular hardware used, which is in turn dealt with by separate hardware interface modules.
As users are provided more flexibility in configuration, the number of nets expands dramatically. Different program nets are required to handle I/O operations with varying parameters, such as different RAID levels, different numbers of disk drives in the array, etc. Such a proliferation of options dramatically increases the programming complexity.